package cn.wolfcode.controller;

import cn.wolfcode.util.UploadUtil;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

@RestController
@CrossOrigin
public class UploadController {
    @PostMapping("/coverImageUpload")
    public String upload(MultipartFile pic) throws IOException {
        return UploadUtil.uploadAlibaba(pic);
    }
}
